<?
	$attributes = array('class' => 'email', 'id' => 'checknew');
	echo form_open('news/dels', $attributes);
?>

<table class="admindata">
    <thead>
        <tr>
            <th colspan="8"> <input type="submit" onclick="return verify_del();" name="btn_submit" class="submit" value="<?=lang('delete');?>">
                <?=lang('total');?>
                <?=$num?>
                <?=lang('record');?>
                <span class="pages">
                <?=$pagination?>
                </span> 
                <!--<span style="float:right;">
                <select name="catid" id="catid" onChange="window.open('<?=url()?>news/index/'+this.options[this.selectedIndex].value+'/<?=$start?>','_self');">
                    <option value="0">Loại tin tức</option>
                    <?php echo $option_category ?>
                </select>
                </span>--></th>
        </tr>
        <script language="javascript">mkselected('catid','<?=$catid?>');</script>
        <tr>
            <th style="width:20px;" class="checkbox"><input type="checkbox" name="sa" id="sa" onclick="check_chose('sa', 'ar_id[]', 'checknew')" /></th>
            <th style="width:120px;">Picture</th>
            <th><?=lang('news_name');?></th>
            <th>Tin vắn</th>
            <th width="17">Ngày tạo</th>
            <th width="22" style="text-align:center;">Views</th>
            <th width="22" style="text-align:center;">Thứ tự</th>
            <th width="17" class="publish"><?=lang('functions');?></th>
        </tr>
    </thead>
    <?
        $k=1;
        $i=1;
        foreach($list as $rs):
			$lb_image = !empty($rs->lb_image)  ? '<img src="'.base_url_site().'uploads/news/'.$rs->lb_image.'" width="120px" />' : '';
	?>
    <tr class="row<?=$k?>">
        <td><input type="checkbox" name="ar_id[]" value="<?=$rs->news_id?>"></td>
        <td><?=$lb_image?></td>
        <td><?=$rs->title_vn?></td>
        <td><?=$rs->summary_vn?></td>
        <td><?=format_date_show($rs->dt_create)?></td>
        <td style="text-align:center;"><?=$rs->nb_read?></td>
        <td style="text-align:center;"><?=$rs->nb_order?></td>
        <td align="center"><?=icon_edit('news/edit/'.$rs->news_id.'/'.$catid.'/'.$start)?>
            <span id="publish<?=$rs->news_id?>">
            <?=icon_active("'news'","'news_id'",$rs->news_id,$rs->bl_active)?>
            </span>
            <?=icon_del('news/del/'.$rs->news_id.'/'.(int)$this->uri->segment(4))?></td>
    </tr>
    <?
        $k=1-$k;
        $i++;
        endforeach;
	?>
    <tr>
        <td colspan="8"><input type="submit" onclick="return verify_del();" name="btn_submit" class="submit" value="<?=lang('delete');?>">
            <?=lang('total');?>
            <?=$num?>
            <?=lang('record');?>
            <span class="pages">
            <?=$pagination?>
            </span></td>
    </tr>
</table>
<?=form_close()?>